package marcis.jarina;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class DBLauncher {

    @Autowired
    private DBFacade dbFacade;

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml"});
        DBLauncher application = context.getBean(DBLauncher.class);
        application.start();
    }

    private void start() {
        //dbFacade.messagePause("HURAY!");
        dbFacade.storeRepositoryInfoToDatabase();
    }


}
